R0 equ 8
SP equ 2

clr lda #0 ;store ptr in R0
 sta R0
 lda #$20
 sta R0+1
 ldy #0
loop
 lda R0+2
 sta (R0),Y
 iny
 lda R0+3
 sta (R0),Y
 iny
 bne loop
 ldx R0+1
 inx
 stx R0+1
 txa
 cmp #$40
 bcc loop
 lda $c057 ;high res
 lda $c055 ;page 2
 lda $c052 ;full graphics
 lda $c050 ;graphics
 rts

	public	black_
black_	
	lda	#0
	sta	R0+2
	sta	R0+3
	jmp	clr
	public	blue_
blue_	
	lda	#$d5
	sta	R0+2
	lda	#$aa
	sta	R0+3
	jmp	clr
	public	violet_
violet_	
	lda	#$55
	sta	R0+2
	lda	#$2a
	sta	R0+3
	jmp	clr
	public	green_
green_	
	lda	#$2a
	sta	R0+2
	lda	#$55
	sta	R0+3
	jmp	clr
	public	red_
red_	
	lda	#$aa
	sta	R0+2
	lda	#$d5
	sta	R0+3
	jmp	clr
